<html>
<head><meta charset="utf-8"><title>macOS openssl-sys · t-compiler/arm · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/index.html">t-compiler/arm</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20openssl-sys.html">macOS openssl-sys</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="203596874"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20openssl-sys/near/203596874" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20openssl-sys.html#203596874">(Jul 11 2020 at 13:33)</a>:</h4>
<p>Hmm. rebasing my branch and cleaning up instructions, it now fails to build Cargo:</p>
<p>I would have assumed that we have our own openssl to link against.</p>
<div class="codehilite"><pre><span></span><code>error: failed to run custom build command for `openssl-sys v0.9.54`

Caused by:
  process didn&#39;t exit successfully: `/Users/shep/Projects/rust/silicon/clean2/build/x86_64-apple-darwin/stage1-tools/release/build/openssl-sys-b2f2e6bddbc1d5cf/build-script-main` (exit code: 101)
--- stdout
cargo:rustc-cfg=const_fn
cargo:rerun-if-env-changed=AARCH64_APPLE_DARWIN_OPENSSL_LIB_DIR
AARCH64_APPLE_DARWIN_OPENSSL_LIB_DIR unset
cargo:rerun-if-env-changed=OPENSSL_LIB_DIR
OPENSSL_LIB_DIR unset
cargo:rerun-if-env-changed=AARCH64_APPLE_DARWIN_OPENSSL_INCLUDE_DIR
AARCH64_APPLE_DARWIN_OPENSSL_INCLUDE_DIR unset
cargo:rerun-if-env-changed=OPENSSL_INCLUDE_DIR
OPENSSL_INCLUDE_DIR unset
cargo:rerun-if-env-changed=AARCH64_APPLE_DARWIN_OPENSSL_DIR
AARCH64_APPLE_DARWIN_OPENSSL_DIR unset
cargo:rerun-if-env-changed=OPENSSL_DIR
OPENSSL_DIR unset
run pkg_config fail: &quot;Cross compilation detected. Use PKG_CONFIG_ALLOW_CROSS=1 to override&quot;

--- stderr
thread &#39;main&#39; panicked at &#39;

Could not find directory of OpenSSL installation, and this `-sys` crate cannot
proceed without this knowledge. If OpenSSL is installed and this crate had
trouble finding it,  you can set the `OPENSSL_DIR` environment variable for the
compilation process.

Make sure you also have the development packages of openssl installed.
For example, `libssl-dev` on Ubuntu or `openssl-devel` on Fedora.

If you&#39;re in a situation where you think the directory *should* be found
automatically, please open a bug at https://github.com/sfackler/rust-openssl
and include information about your system as well as this message.

$HOST = x86_64-apple-darwin
$TARGET = aarch64-apple-darwin
openssl-sys = 0.9.54



It looks like you&#39;re compiling on macOS, where the system contains a version of
OpenSSL 0.9.8. This crate no longer supports OpenSSL 0.9.8.

As a consumer of this crate, you can fix this error by using Homebrew to
install the `openssl` package, or as a maintainer you can use the openssl-sys
0.7 crate for support with OpenSSL 0.9.8.

Unfortunately though the compile cannot continue, so aborting.

&#39;, /Users/shep/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-sys-0.9.54/build/find_normal.rs:150:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
</code></pre></div>



<a name="203600378"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20openssl-sys/near/203600378" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20openssl-sys.html#203600378">(Jul 11 2020 at 15:07)</a>:</h4>
<p><span class="user-mention" data-user-id="116155">@Jake Goulding</span> To build the static versions, you need to set cargo-native-static in config.toml.  This is done in CI, but is not automatically set by bootstrap.  Hm, thinking about it more, I'm really uncertain why it is not the default, since it appears that all CI builders do that.</p>



<a name="203600608"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20openssl-sys/near/203600608" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20openssl-sys.html#203600608">(Jul 11 2020 at 15:13)</a>:</h4>
<p>Ah, thank you. I assume not the default due to extra compile times. Although most people probably aren’t building cargo via x.py anyway.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>